#include <bits/stdc++.h>

using namespace std;
const int maxn=50;
struct node
{
    int level;
    int data;
    vector<int> childs;
}Nodes[maxn];
void pre_order(int root)
{
    printf("%d",Nodes[root].data);
    for (int i=0;i<Nodes[root].childs.size() ;++i )
    {
        pre_order(Nodes[root].childs[i]);
    }
}
void level_order(int root)
{
    queue<int> q;
    q.push(root);
    Nodes[root].level=0;
    while (!q.empty())
    {
        int now=q.front();
        q.pop();
        printf("%d",Nodes[now].data);
        for (int i=0;i<Nodes[now].childs.size() ;++i )
        {
            int child=Nodes[now].childs[i];
            Nodes[child].level=Nodes[now].level+1;
            q.push(child);
        }
    }
}
int main_126()
{

    return 0;
}
